package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.*;

/**
 * @author: 徐波
 * @creat: 2017/11/23 0023 15:34
 * description:
 */
@Entity
@Table(name = "T_SYS_USER_REGION", schema = "oa", catalog = "")
public class User2RegionEntity extends BaseEntity {
     private String userId;
     private String regionId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID",this.getId());
        json.put("USER_ID",this.getUserId());
        json.put("REGION_ID",this.getRegionId());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_USER_2_REGION";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID","id");
        json.put("USER_ID","userId");
        json.put("REGION_ID","regionId");
        return json;
    }
}
